1. Field of the Invention
The present invention relates to data communications and, more particularly, to managing download of data for multimedia, video, and/or audio streams.
2. Description of the Related Art
Video streaming has become more and more popular. In video streaming, a client machine (such as a desktop or laptop computer or a Web-enabled mobile phone) receives a video stream from a video source over a network connection. The video stream generally includes video format data comprising graphic or image data as well as audio data. The video stream may comprise a video clip having content of a predetermined length, such as a movie or presentation, or the video stream may comprise an ongoing video feed of undetermined length, such as output from a Web cam or some other live signal feed. Several communication protocols have been developed and are standardized to enable streaming video transfer between video source and client machine, for example, protocols such as RTSP, RTMP, HTTP progressive download, MMS, and custom protocols. An example of a download session using HTTP progressive download utilizing the Transmission Control Protocol is described herein as an example download session, but the methods described herein can be utilized with any of the protocols listed above.
In progressive download, reproduction or playback of the video data stream begins after an initial file download using the HTTP protocol from the client end. The initial file can include a portion of the video stream or all of the video stream. When the initial file is a portion of the video stream, it is followed by download of subsequent files corresponding to subsequent portions of the video stream. The files are generally referred to as chunks of the video stream. As the chunks are downloaded, the video playback is started after receiving a few seconds of video data from the video stream without waiting until the entire video stream has been received. The subsequent files comprising the remaining video are downloaded, decoded, and rendered for playback. There has been tremendous demand for video viewing on the Internet and that viewing demand has in turn increased demands on wireless network resources due to ubiquitous coverage and mobile users consuming video seemingly everywhere service is available. Unfortunately, the popularity of video streaming sometimes causes overloading of some bandwidth-limited networks, especially radio frequency (RF) wireless networks such as, for example, cellular telephone networks, WiFi networks, satellite networks, and the like.
The underlying network protocol used for most video is usually TCP or UDP over IP networks. In recent years, the network transfer protocol used for delivery of Internet traffic over all types of networks, including RF wireless networks, is the Transmission Control Protocol (TCP), which is used in conjunction with the Internet Protocol (IP) and is often jointly referred to as TCP/IP. TCP provides reliable, ordered, error-free delivery of a stream of bytes from a program on one computer to a program on another computer. The bytes being transferred are typically organized into packets that are routed over the network using the IP protocol. The TCP protocol has mechanisms for packet flow control, retransmission in case of packet loss, segment size, amount of data in pipeline, network congestion avoidance, and session control, e.g., establishment and termination of a communication session.
Due to factors such as network congestion, traffic load balancing, switch memory overflow, physical link layer loss, or other unpredictable network behavior, IP packets can be lost, duplicated, or delivered out of order at the receiving client. These add to processing operations at the client and can result in choppy video on playback. TCP detects data packet loss and/or delay problems, requests retransmission of lost packets, and rearranges out-of-order packets. TCP also tries to reduce network congestion, to reduce the occurrence of the other problems mentioned above, by packet flow control. Packets comprise collections of bytes of data. For TCP/IP, and indeed for each type of network technology, there is a maximum transmission unit (MTU) that determines the greatest number of bytes (or packets) in a data unit for processing, such as a frame of video data. Once the client machine TCP receiver, which is part of the machine's operating system kernel, has finally reassembled a perfect copy of the data packets originally transmitted into a datagram, it passes that datagram to the application program of the client machine for playback.
TCP is optimized for accurate delivery rather than for timely delivery, and therefore, TCP processing sometimes incurs relatively long delays (on the order of seconds) while waiting for out-of-order messages or retransmissions of lost messages. For viewing video streams, delays in the reception of packets could underflow the video player at the client, resulting in stalled or choppy playback.
Wireless network links are known to experience sporadic and usually temporary losses due to communication artifacts such as fading, shadowing, hand-off, and other radio effects. These effects cannot be considered as being due to network congestion, but nevertheless, TCP may react to such losses with network back-off operations designed to combat congestion. For example, TCP maintains a congestion window, which is the number of unacknowledged packets that are in transit between a sender and receiver. Back-off operations may involve a decrease in the size of the congestion window. After the (erroneous) back-off of the congestion window size, TCP can enter a congestion avoidance phase with a conservative decrease in window size.
This congestion avoidance phase can cause the wireless radio link to be underutilized, causing unnecessary reduced throughput.
Progressive download results in an aggressive (as fast as possible) download of video from the HTTP server over the network. This is another source of inefficient use of a network when a user selects a video for download, watches a short portion of the video, and then stops watching the video. Since the progressive download transmits the video stream as quickly as possible, unviewed packets may be transmitted over the network and accumulated at the client machine, only to be discarded after the user at the client stops watching the video. This wastes valuable network bandwidth and resources.
For these and other reasons, various adaptations of content streams are desired at the edges of various communications networks, wired or wireless. Various adaptation schemes include rate adaptation, content replacement, addition of textual content, and the like. More enjoyable content streaming at the receiving device, and more efficient use of the communications networks, could be achieved with efficient identification of content streams to be adapted in one way or another, for modification of content without the knowledge of the sending device or the receiving device.